#ifndef __SCENE_H__
#define __SCENE_H__

#include <vector>
//#include <iostream>
#include "euler_operators.h"
#include "solid.h"

class Scene{
    public:
        Scene();
        ~Scene();

        void addSolid(Solid *);
        void deleteSolid(Solid *);
        void addSelectedSolid(Solid *, bool);
        void addSelectedEdge(Edge *, bool);
        void addSelectedFace(Face *, bool);
        void addSelectedVertex(Vertex *, bool);
        void addSelectedPoint(Point *, bool);

        void selectAdjacentVertices(std::vector<Vertex *>*);
        void selectAdjacentVV(std::vector<Vertex *>*);
        void selectAdjacentEV(std::vector<Vertex *>*);
        void selectAdjacentFV(std::vector<Vertex *>*);
        void selectAdjacentSV(std::vector<Vertex *>*);

        void selectAdjacentEdges(std::vector<Edge *>*);
        void selectAdjacentVE(std::vector<Edge *>*);
        void selectAdjacentEE(std::vector<Edge *>*);
        void selectAdjacentFE(std::vector<Edge *>*);
        void selectAdjacentSE(std::vector<Edge *>*);

        void selectAdjacentFaces(std::vector<Face *>*);
        void selectAdjacentVF(std::vector<Face *>*);
        void selectAdjacentEF(std::vector<Face *>*);
        void selectAdjacentFF(std::vector<Face *>*);
        void selectAdjacentSF(std::vector<Face *>*);

        void selectAdjacentSolids(std::vector<Solid *>*);
        void selectAdjacentVS(std::vector<Solid *>*);
        void selectAdjacentES(std::vector<Solid *>*);
        void selectAdjacentFS(std::vector<Solid *>*);
        void selectAdjacentSS(std::vector<Solid *>*);

        void scale(double);
        void translate(Point);
        //void rotate(double);

        bool changeColor(Color);
        bool sweep(Point);
        bool toBezier();
        void movePoints(Point);

        bool analyseArea(double*);

        Solid *getSolid(int);
        Solid *makeBox();
        Solid *makeCorner();
        Solid *makeSphere();

        int sizeSolids();

        void draw(unsigned int, bool, bool);
        void drawFace(Face *);
        void drawEdge(Edge *);
        void drawVertex(Vertex *);
        void print();

    private:
        std::vector<Solid *> solids;
        std::vector<Solid *> selectedSolids;
        std::vector<Face *> selectedFaces;
        std::vector<Edge *> selectedEdges;
        std::vector<Vertex *> selectedVertices;
        std::vector<Point *> selectedPoints;
        EulerOperators euler;

        Color selectedColor;
};

#endif
